# coding: UTF-8

class BaseError(Exception):
    """自定义异常都需要继承的基类"""
    http_return_msg = "服务器繁忙~"

    def __init__(self, error_code, error_msg, http_show_msg=None):
        self.http_show_msg = http_show_msg
        self.error_code = error_code
        self.error_msg = error_msg
        super().__init__(error_msg)


class ArgsMissError(BaseError):
    """参数缺失异常"""
    http_return_msg = "参数缺失~"

    def __init__(self, error_msg):
        super().__init__(10006, error_msg)


class ArgsErrError(BaseError):
    """参数错误异常"""
    http_return_msg = "参数错误~"

    def __init__(self, error_msg):
        super().__init__(10009, error_msg)
